package a.f.l;

import a.c.ab;
import a.c.bb;
import a.c.d;
import a.c.e;
import a.c.k;
import a.c.n;
import a.c.v;
import a.f.*;
import a.i.db;
import a.i.i;

import java.awt.geom.Rectangle2D;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;

import a.f.l.x;
import a.f.l.t;
import a.f.l.y;
import a.f.l.z;

class eb
{
  private static final int a = 5;
  public static final byte b = 2;
  public static final byte c = 4;
  public static final byte d = 8;
  private static final byte e = 1;
  private static final byte f = 2;
  private static final byte g = 4;
  private static final byte h = 8;
  private a.f.o i;
  private byte j;
  private double k;
  private boolean l;
  private boolean m;
  private Rectangle2D n;
  private boolean o;
  private double p;
  private boolean q;
  private long r;
  private b_ s;
  private b_ t;
  private a.c.z u;
  private a.c.z v;
  private d_ w;
  private a.c.z x;
  private a.c.z y;
  private a.c.z z;
  private b_ A;
  private bb B;
  private ab C;
  private a.c.z D;
  private a.c.z E;
  private sb F;
  private sb G;
  private rb H;
  private qb I;
  private int J = 0;
  private int K = 0;
  private static final double L = 0.01D;
  private boolean M;
  
  public eb(a.f.o paramo)
  {
    this.i = paramo;
    this.B = new bb(paramo.v());
    this.C = paramo.J();
    a();
  }
  
  public eb(a.f.o paramo, ab paramab)
  {
    this.i = paramo;
    this.B = new bb(paramo.v());
    this.C = paramab;
    a();
  }
  
  public eb(a.f.o paramo, Object paramObject1, Object paramObject2)
  {
    k localk;
    Object localObject;
    if (i2 == 0)
    {
      this.i = paramo;
      if (paramObject1 != null)
      {
        localk = paramo.c(paramObject1);
        this.B = new bb();
        localObject = paramo.v();
        do
        {
          if (!((a.c.w)localObject).e()) {
            break;
          }
          if (i1 != 0) {
            break label147;
          }
          if (i2 == 0)
          {
            if (localk.getBool(((a.c.w)localObject).d())) {
              this.B.add(((a.c.w)localObject).d());
            }
            ((a.c.w)localObject).f();
          }
        } while (i1 == 0);
      }
      if (i2 != 0) {}
    }
    else
    {
      this.B = new bb(paramo.v());
    }
    if (paramObject2 != null)
    {
      label147:
      localk = paramo.c(paramObject2);
      this.C = new ab();
      localObject = paramo.w();
      do
      {
        if (!((a.c.m)localObject).e()) {
          break;
        }
        if (i2 == 0)
        {
          if (localk.getBool(((a.c.m)localObject).a())) {
            this.C.add(((a.c.m)localObject).a());
          }
          ((a.c.m)localObject).f();
        }
      } while (i1 == 0);
    }
    if (i2 == 0) {
      this.C = paramo.J();
    }
    a();
  }
  
  private void a()
  {
    this.r = 0L;
    this.j = 2;
    this.k = 3.0D;
    this.o = false;
    this.q = false;
    this.l = false;
    this.m = false;
  }
  
  private x a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    Object localObject;
    if (i2 == 0) {
      if (this.M)
      {
        if (i2 == 0) {
          if (this.m)
          {
            localObject = new z(paramDouble1, paramDouble2, paramDouble1 + paramDouble3, paramDouble2 + paramDouble4, true);
            if (i2 != 0) {
              break label133;
            }
            if (i1 == 0) {
              break label121;
            }
          }
        }
        if (this.l)
        {
          localObject = new y(paramDouble1, paramDouble2, paramDouble1 + paramDouble3, paramDouble2 + paramDouble4, true);
          if (i2 != 0) {
            break label133;
          }
          if (i1 == 0) {}
        }
        else
        {
          localObject = new x(paramDouble1, paramDouble2, paramDouble1 + paramDouble3, paramDouble2 + paramDouble4, true);
        }
        label121:
        this.D.add(localObject);
        label133:
        if ((i2 == 0) && (i1 == 0)) {
          break label250;
        }
      }
    }
    if (i2 == 0) {
      if (this.m)
      {
        localObject = new z(paramDouble2, paramDouble1, paramDouble2 + paramDouble4, paramDouble1 + paramDouble3, false);
        if (i2 != 0) {
          break label249;
        }
        if (i1 == 0) {
          break label240;
        }
      }
    }
    if (this.l)
    {
      localObject = new y(paramDouble2, paramDouble1, paramDouble2 + paramDouble4, paramDouble1 + paramDouble3, false);
      if (i2 != 0) {
        break label249;
      }
      if (i1 == 0) {}
    }
    else
    {
      localObject = new x(paramDouble2, paramDouble1, paramDouble2 + paramDouble4, paramDouble1 + paramDouble3, false);
    }
    label240:
    label249:
    this.E.add(localObject);
    label250:
    return localObject;
  }
  
  private void a(t paramt1, t paramt2)
  {
    x localx2 = (x)paramt1.f();
    x localx1 = (x)paramt2.f();
    a.c.z localz = (a.c.z)this.F.get(localx2);
    localz.add(localx1);
    localz = (a.c.z)this.F.get(localx1);
    localz.add(localx2);
    this.K += 1;
  }
  
  private void a(t paramt1, t paramt2, byte paramByte)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    e locale = (e)paramt1.f();
    nb localnb1 = (nb)this.I.get(paramt2);
    nb localnb2 = (nb)this.H.get(locale);
    if (i2 == 0) {
      if (this.M)
      {
        if (i2 == 0) {
          switch (paramByte)
          {
          case 1: 
            localnb2.b(paramt2);
            localnb1.d(locale);
            if (i2 == 0) {
              if (i1 == 0) {
                break;
              }
            }
            break;
          case 2: 
            localnb2.d(paramt2);
            localnb1.b(locale);
          }
        }
        if ((i2 == 0) && (i1 == 0)) {
          return;
        }
      }
    }
    if (i2 == 0) {}
    switch (paramByte)
    {
    case 1: 
      localnb2.f(paramt2);
      localnb1.h(locale);
      if (i2 == 0) {
        if (i1 == 0) {
          return;
        }
      }
    case 2: 
      localnb2.h(paramt2);
      localnb1.f(locale);
    }
  }
  
  private void b(t paramt1, t paramt2, byte paramByte)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    e locale = (e)paramt1.f();
    nb localnb1 = (nb)this.I.get(paramt2);
    nb localnb2 = (nb)this.H.get(locale);
    if (i2 == 0) {
      if (this.M)
      {
        if (i2 == 0) {
          switch (paramByte)
          {
          case 1: 
            if (i2 == 0)
            {
              if ((e)localnb1.c() != locale) {
                localnb2.a(paramt2);
              }
            }
            else
            {
              localnb1.c(locale);
              if (i2 != 0) {
                break label166;
              }
              if (i1 == 0) {
                break;
              }
            }
            break;
          case 2: 
            if (i2 == 0)
            {
              if ((e)localnb1.a() != locale) {
                localnb2.c(paramt2);
              }
            }
            else {
              localnb1.a(locale);
            }
            break;
          }
        }
        label166:
        if ((i2 == 0) && (i1 == 0)) {
          return;
        }
      }
    }
    switch (paramByte)
    {
    case 1: 
      if (i2 == 0)
      {
        if ((e)localnb1.g() != locale) {
          localnb2.e(paramt2);
        }
      }
      else if (i2 == 0)
      {
        localnb1.g(locale);
        if (i1 == 0) {
          return;
        }
      }
      break;
    case 2: 
      if (i2 == 0)
      {
        if ((e)localnb1.e() != locale) {
          localnb2.g(paramt2);
        }
      }
      else {
        localnb1.e(locale);
      }
      break;
    }
  }
  
  private void b()
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    Object localObject1 = this.i.w();
    Object localObject2;
    label162:
    label164:
    do
    {
      do
      {
        if (!((a.c.m)localObject1).e()) {
          break label167;
        }
        localObject2 = ((a.c.m)localObject1).a();
        this.i.a((d)localObject2, a.d.w.b(this.i.p((d)localObject2)));
        if (i3 == 0)
        {
          this.i.b((d)localObject2, a.d.w.b(this.i.q((d)localObject2)));
          if (i2 != 0) {
            break label171;
          }
        }
        zb localzb = this.i.b((d)localObject2);
        int i1 = 0;
        do
        {
          if (i1 >= localzb.a()) {
            break;
          }
          a.d.w localw = localzb.a(i1);
          localzb.a(i1, localw.b, localw.a);
          i1++;
          if (i3 != 0) {
            break label164;
          }
          if (i2 != 0) {
            break label162;
          }
        } while (i2 == 0);
      } while (i3 != 0);
      ((a.c.m)localObject1).f();
    } while (i2 == 0);
    label167:
    label171:
    localObject1 = this.i.v();
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      double d1 = this.i.p((e)localObject2);
      double d2 = this.i.q((e)localObject2);
      double d3 = this.i.s((e)localObject2);
      double d4 = this.i.t((e)localObject2);
      this.i.b((e)localObject2, d4, d3);
      this.i.c((e)localObject2, d2, d1);
      ((a.c.w)localObject1).f();
    } while (i2 == 0);
  }
  
  private void c()
  {
    this.n.setFrame(this.n.getY(), this.n.getX(), this.n.getHeight(), this.n.getWidth());
  }
  
  public void a(byte paramByte)
  {
    this.j = paramByte;
  }
  
  public void a(Rectangle2D paramRectangle2D)
  {
    int i1 = g.Cc;
    if (i1 == 0) {
      if (this.n != null)
      {
        this.n.setFrame(paramRectangle2D.getX(), paramRectangle2D.getY(), paramRectangle2D.getWidth(), paramRectangle2D.getHeight());
        if (i1 != 0) {
          return;
        }
        if (g.Bc == 0) {
          break label75;
        }
      }
    }
    this.n = new Rectangle2D.Double(paramRectangle2D.getX(), paramRectangle2D.getY(), paramRectangle2D.getWidth(), paramRectangle2D.getHeight());
    label75:
    this.o = true;
  }
  
  public void a(double paramDouble)
  {
    this.p = paramDouble;
    this.q = true;
  }
  
  public void c(double paramDouble)
  {
    int i1 = g.Cc;
    if (i1 == 0)
    {
      if (Math.abs(paramDouble) > 0.0D)
      {
        if (i1 != 0) {
          break label39;
        }
        this.k = Math.abs(paramDouble);
      }
    }
    else if (g.Bc == 0) {
      return;
    }
    label39:
    this.k = 0.5D;
  }
  
  public void a(boolean paramBoolean)
  {
    this.l = paramBoolean;
  }
  
  public void c(boolean paramBoolean)
  {
    this.m = paramBoolean;
  }
  
  public a.c.z d()
  {
    return this.D;
  }
  
  public a.c.z e()
  {
    return this.E;
  }
  
  public k f()
  {
    return this.G;
  }
  
  public k g()
  {
    return this.H;
  }
  
  public k h()
  {
    return this.F;
  }
  
  public String i()
  {
    return "\n===Orthogonal Sweepline===\nNumber of obstacles (nodes) = " + this.i.k() + "\n" + "Number of additional obstacles (edge segments) = " + this.J + "\n" + "BoundingBox = " + this.n + "\n" + "Halo = " + this.k + "\n" + "Number of vertical sight patches = " + this.D.size() + "\n" + "Number of horizontal sight patches = " + this.E.size() + "\n" + "Number of sight patch intersections = " + this.K + "\n" + "===Orthogonal Sweepline===\n";
  }
  
  private void j()
  {
    int i2 = g.Cc;
    if (i2 == 0)
    {
      if (this.o) {
        return;
      }
      this.n = k();
    }
    if (i2 == 0) {
      if (this.q)
      {
        i1 = (int)this.p;
        if (i2 != 0) {
          return;
        }
        if (g.Bc == 0) {
          break label61;
        }
      }
    }
    int i1 = (int)(10.0D * this.k);
    label61:
    this.n.setFrame(this.n.getX() - i1, this.n.getY() - i1, this.n.getWidth() + 2 * i1, this.n.getHeight() + 2 * i1);
  }
  
  private Rectangle2D k()
  {
    if (g.Cc == 0) {
      if (this.i.n()) {
        return new Rectangle2D.Double(0.0D, 0.0D, 0.0D, 0.0D);
      }
    }
    Rectangle2D localRectangle2D = wc.a(this.i, this.B.l(), this.C.l());
    return new Rectangle2D.Double((int)localRectangle2D.getX(), (int)localRectangle2D.getY(), (int)localRectangle2D.getWidth(), (int)localRectangle2D.getHeight());
  }
  
  private void l()
  {
    this.w = new d_();
    this.z = new a.c.z();
    this.s = new b_(this.w);
    this.t = new b_(this.w);
    this.u = new a.c.z();
    this.v = new a.c.z();
  }
  
  private void m()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    this.I = new qb();
    this.G = new sb();
    this.H = new rb();
    do
    {
      a.c.w localw = this.B.l();
      while (i1 == 0)
      {
        if (!localw.e()) {
          break;
        }
        this.H.a((e)localw.j(), new nb());
        localw.f();
      }
    } while (i2 != 0);
  }
  
  private void n()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    this.F = new sb();
    a.c.y localy = this.E.h();
    do
    {
      do
      {
        if (!localy.e()) {
          break;
        }
        this.F.a((x)localy.j(), new a.c.z());
        localy.f();
        if (i2 != 0) {
          break label95;
        }
        if (i1 != 0) {
          break label89;
        }
      } while (i1 == 0);
    } while (i2 != 0);
    label89:
    label95:
    do
    {
      localy = this.D.h();
      while (i1 == 0)
      {
        if (!localy.e()) {
          break;
        }
        this.F.a((x)localy.j(), new a.c.z());
        localy.f();
      }
    } while (i2 != 0);
  }
  
  private void o()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    if (i2 == 0) {
      if (this.M)
      {
        if (i2 != 0) {
          break label41;
        }
        localz = this.D;
        if (i1 == 0) {
          break label42;
        }
      }
    }
    label41:
    a.c.z localz = this.E;
    label42:
    a.c.y localy = localz.h();
    Object localObject;
    do
    {
      do
      {
        if (!localy.e()) {
          break;
        }
        localObject = (x)localy.j();
        t localt = ((x)localObject).b();
        nb localnb = (nb)this.I.get(localt);
        if (i2 != 0) {
          break label243;
        }
        this.G.a((x)localObject, localnb);
        localy.f();
        if (i1 != 0) {
          break label242;
        }
      } while (i1 == 0);
      if (i2 != 0) {
        break label243;
      }
    } while (i2 != 0);
    if (this.M)
    {
      localw = this.B.l();
      do
      {
        if (!localw.e()) {
          break;
        }
        localObject = (nb)this.H.get((e)localw.j());
        ((nb)localObject).a = a(((nb)localObject).a);
        ((nb)localObject).b = a(((nb)localObject).b);
        ((nb)localObject).c = a(((nb)localObject).c);
        ((nb)localObject).d = a(((nb)localObject).d);
        localw.f();
      } while (i1 == 0);
    }
    label242:
    label243:
    a.c.w localw = this.B.l();
    do
    {
      if (!localw.e()) {
        break;
      }
      localObject = (nb)this.H.get((e)localw.j());
      ((nb)localObject).e = a(((nb)localObject).e);
      ((nb)localObject).f = a(((nb)localObject).f);
      ((nb)localObject).g = a(((nb)localObject).g);
      ((nb)localObject).h = a(((nb)localObject).h);
      localw.f();
    } while (i1 == 0);
  }
  
  private a.c.z a(a.c.z paramz)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    a.c.z localz = new a.c.z();
    Object localObject = null;
    a.c.y localy = paramz.h();
    if (localy.e()) {}
    while (i2 != 0)
    {
      t localt = (t)localy.j();
      x localx = (x)localt.f();
      if (i2 == 0) {
        if ((localx != localObject) && (localx != null)) {
          localz.add(localx);
        }
      }
      localObject = localx;
      localy.f();
      if (i1 == 0) {
        break;
      }
    }
    return localz;
  }
  
  private void p()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    x localx;
    a.c.z localz;
    a.c.y localy2;
    y localy;
    if (i2 == 0) {
      label128:
      if (this.M)
      {
        localy1 = this.D.h();
        label126:
        do
        {
          if (!localy1.e()) {
            break;
          }
          localx = (x)localy1.j();
          localz = ((y)localx).k;
          localy2 = localz.h();
          do
          {
            do
            {
              if (!localy2.e()) {
                break;
              }
              localy = (y)localy2.j();
              localy.a(false, (y)localx);
              localy2.f();
              if (i2 != 0) {
                break label128;
              }
              if (i1 != 0) {
                break label126;
              }
            } while (i1 == 0);
          } while (i2 != 0);
          localy1.f();
        } while (i1 == 0);
      }
    }
    a.c.y localy1 = this.E.h();
    label235:
    label237:
    do
    {
      if (!localy1.e()) {
        break;
      }
      localx = (x)localy1.j();
      localz = ((y)localx).k;
      localy2 = localz.h();
      do
      {
        do
        {
          if (!localy2.e()) {
            break;
          }
          localy = (y)localy2.j();
          localy.a(false, (y)localx);
          localy2.f();
          if (i2 != 0) {
            break label237;
          }
          if (i1 != 0) {
            break label235;
          }
        } while (i1 == 0);
      } while (i2 != 0);
      localy1.f();
    } while (i1 == 0);
  }
  
  private void q()
  {
    this.w = null;
    this.z = null;
    this.s = null;
    this.t = null;
    this.u = null;
    this.v = null;
  }
  
  public void r()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    j();
    m();
    if (i2 == 0) {
      if (this.m) {
        this.l = true;
      }
    }
    if (i2 == 0) {
      if (this.j == 8)
      {
        t();
        u();
        n();
        s();
        if (i2 == 0) {
          if (i1 == 0) {
            return;
          }
        }
      }
      else
      {
        if (i2 != 0) {
          break label94;
        }
      }
    }
    if (this.j == 4)
    {
      if (i2 != 0) {
        break label94;
      }
      u();
      if (i1 == 0) {
        return;
      }
    }
    label94:
    t();
  }
  
  void s()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    a.c.z localz = new a.c.z();
    Object localObject = this.E.h();
    do
    {
      do
      {
        if (!((a.c.y)localObject).e()) {
          break;
        }
        localz.add(new g_((x)((a.c.y)localObject).j()));
        ((a.c.y)localObject).f();
        if (i2 != 0) {
          break label96;
        }
        if (i1 != 0) {
          break label90;
        }
      } while (i1 == 0);
    } while (i2 != 0);
    label90:
    label96:
    do
    {
      localObject = this.D.h();
      while (i1 == 0)
      {
        if (!((a.c.y)localObject).e()) {
          break;
        }
        localz.add(new g_((x)((a.c.y)localObject).j()));
        ((a.c.y)localObject).f();
      }
    } while (i2 != 0);
    localObject = new Rectangle2D.Double();
    Rectangle2D.Double localDouble1 = new Rectangle2D.Double();
    Rectangle2D.Double localDouble2 = new Rectangle2D.Double();
    a.d.m.a(localz, new m.g_()
    {
      private final Rectangle2D.Double val$b1;
      private final Rectangle2D.Double val$b2;
      private final Rectangle2D.Double val$ibox;
      
      public void a(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        int i = g.Cc;
        eb.g_ localg_1 = (eb.g_)paramAnonymousObject1;
        eb.g_ localg_2 = (eb.g_)paramAnonymousObject2;
        if (i == 0)
        {
          if (localg_1.h.l() != localg_2.h.l())
          {
            this.val$b1.setFrame(localg_1.d, localg_1.e, localg_1.a, localg_1.b);
            this.val$b2.setFrame(localg_2.d, localg_2.e, localg_2.a, localg_2.b);
            Rectangle2D.intersect(this.val$b1, this.val$b2, this.val$ibox);
          }
        }
        else if ((i != 0) || ((this.val$ibox.width > 0.01D) && ((i != 0) || (this.val$ibox.height > 0.01D))))
        {
          a.c.z localz = (a.c.z)eb.this.F.get(localg_1.h);
          localz.add(localg_2.h);
          localz = (a.c.z)eb.this.F.get(localg_2.h);
          localz.add(localg_1.h);
          eb.access$108(eb.this);
        }
      }
    });
  }
  
  private void t()
  {
    this.M = true;
    this.D = new a.c.z();
    x();
  }
  
  private void u()
  {
    this.M = false;
    this.E = new a.c.z();
    c();
    b();
    x();
    b();
    c();
  }
  
  private void v()
  {
    this.r += 1L;
    t localt = new t(this.n.getX(), this.n.getY(), this.n.getY() + this.n.getHeight(), (byte)8, this.r);
    this.s.a(this.n.getY(), localt);
  }
  
  private void w()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    a.c.y localy = this.s.a().h();
    do
    {
      if (!localy.e()) {
        break;
      }
      t localt1 = (t)localy.j();
      double d1 = localt1.a();
      double d2 = localt1.b();
      t localt2 = (t)this.s.c(d2, localt1);
      x localx = a(d1, d2, this.n.getX() + this.n.getWidth() - d1, this.n.getY() + this.n.getHeight() - d2);
      localt2.a(localx);
      localt1.a(localx);
      localx.a(localt2, localt1);
      if (i2 == 0)
      {
        if (this.l) {
          ((y)localx).a(true, localt2.i);
        }
        localy.f();
      }
    } while (i1 == 0);
  }
  
  private void x()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    l();
    D();
    F();
    this.z.a(new f_());
    a.c.z localz = this.z;
    v();
    a.c.y localy = localz.h();
    double d1 = ((t)localy.j()).a();
    if (localy.e()) {}
    do
    {
      t localt = (t)localy.j();
      if (i1 != 0) {
        break label226;
      }
      if (localt.a() > d1)
      {
        d1 = localt.a();
        A();
        B();
        this.u.clear();
        this.v.clear();
      }
      if (i2 == 0)
      {
        if (localt.d() == 8) {
          this.u.add(localt);
        }
        if (i2 != 0) {}
      }
      else
      {
        if (localt.d() == -8) {
          this.v.add(localt);
        }
        localy.f();
      }
      if (i1 == 0) {
        break;
      }
      A();
      B();
      this.u.clear();
      this.v.clear();
      w();
      o();
    } while (i2 != 0);
    if (this.l) {
      label226:
      p();
    }
    q();
  }
  
  private void y()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    this.u = new a.c.z();
    this.v = new a.c.z();
    this.w = new d_();
    this.x = new a.c.z();
    G();
    a.c.z localz1 = this.x;
    this.y = new a.c.z();
    H();
    a.c.z localz2 = this.y;
    this.A = new b_(this.w);
    a.c.y localy1 = localz1.h();
    a.c.y localy2 = localz2.h();
    double d1 = ((t)localy1.j()).a();
    if (localy1.e()) {}
    do
    {
      t localt = (t)localy1.j();
      if ((i2 == 0) && (i1 != 0)) {
        return;
      }
      if (i2 == 0) {
        if (localt.a() > d1)
        {
          d1 = localt.a();
          a(localy2);
          z();
          this.u.clear();
          this.v.clear();
        }
      }
      if (i2 == 0)
      {
        if (localt.d() == 8) {
          this.u.add(localt);
        }
        if (i2 != 0) {}
      }
      else
      {
        if (localt.d() == -8) {
          this.v.add(localt);
        }
        localy1.f();
      }
      if (i1 == 0) {
        break;
      }
      a(localy2);
      z();
      this.u.clear();
      this.v.clear();
      this.w = null;
      this.x = null;
      this.y = null;
      this.A = null;
      this.u = null;
    } while (i2 != 0);
    this.v = null;
  }
  
  private void z()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    if (i2 == 0) {
      if (this.u.isEmpty()) {
        return;
      }
    }
    a.c.y localy = this.u.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      t localt = (t)localy.j();
      this.A.a(localt.b(), localt);
      localy.f();
    } while (i1 == 0);
  }
  
  private void a(a.c.y paramy)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    if (i2 == 0) {
      if (this.v.isEmpty()) {
        return;
      }
    }
    a.c.y localy1 = this.v.h();
    double d1 = ((t)localy1.j()).a();
    double d2 = 0.0D;
    if (i2 == 0) {
      if (paramy.e()) {
        d2 = ((t)paramy.j()).a();
      }
    }
    label262:
    do
    {
      do
      {
        if (!paramy.e()) {
          break label278;
        }
        if (i1 != 0) {
          break label289;
        }
        if (d2 > d1) {
          break label278;
        }
        t localt2 = (t)paramy.j();
        d2 = localt2.a();
        if (i2 != 0) {
          break;
        }
        if (localt2.d() == -8)
        {
          double d3 = localt2.b();
          double d4 = localt2.c();
          a.c.z localz = this.A.a();
          a.c.y localy2 = localz.h();
          do
          {
            if (!localy2.e()) {
              break label262;
            }
            t localt3 = (t)localy2.j();
            double d5 = localt3.b();
            double d6 = localt3.c();
            if (i1 != 0) {
              break;
            }
            if (d3 <= d5)
            {
              if (i2 != 0) {
                continue;
              }
              if (d4 >= d6)
              {
                if (i2 != 0) {
                  continue;
                }
                if (localt3.a() <= d2) {
                  a(localt2, localt3);
                }
              }
            }
            localy2.f();
          } while (i1 == 0);
        }
        paramy.f();
      } while (i2 != 0);
    } while (i1 == 0);
    label278:
    label289:
    do
    {
      if ((i2 == 0) && (!localy1.e())) {
        break;
      }
      t localt1 = (t)localy1.j();
      this.A.c(localt1.b(), localt1);
      localy1.f();
    } while (i1 == 0);
  }
  
  private void A()
  {
    int i5 = g.Cc;
    int i4 = g.Bc;
    if (this.v.isEmpty()) {
      return;
    }
    t localt1 = null;
    a.c.z localz = null;
    if (this.l) {
      localz = new a.c.z();
    }
    a.c.y localy1 = this.v.h();
    label55:
    if (localy1.e())
    {
      break label106;
      localt1 = (t)localy1.j();
    }
    double d1;
    double d2;
    label106:
    t localt2;
    double d3;
    double d4;
    label326:
    label337:
    while (i5 != 0)
    {
      d1 = localt1.b();
      if (i4 != 0) {
        break label372;
      }
      d2 = localt1.c();
      localy2 = this.s.a().h();
      int i1 = 0;
      do
      {
        if (!localy2.e()) {
          break label337;
        }
        if (i4 != 0) {
          break;
        }
        if (i1 != 0) {
          break label337;
        }
        localt2 = (t)localy2.j();
        d3 = localt2.b();
        d4 = localt2.c();
        if ((i5 != 0) || (d4 >= d1))
        {
          if (i5 == 0)
          {
            if (d3 > d2) {
              i1 = 1;
            }
          }
          else
          {
            if (i5 != 0) {
              continue;
            }
            if (i4 == 0) {
              break label326;
            }
          }
          t localt4 = (t)this.s.c(d3, localt2);
          if (i5 != 0) {
            continue;
          }
          if (localt1.a() > localt2.a())
          {
            x localx = a(localt2.a(), d3, localt1.a() - localt2.a(), d4 - d3);
            if (i5 == 0)
            {
              if ((localt4.f() instanceof d)) {
                localx.a();
              }
              localt4.a(localx);
              localt2.a(localx);
              localx.a(localt4, localt2);
            }
            if (i5 != 0) {
              continue;
            }
            if (this.l)
            {
              localz.add(localx);
              ((y)localx).a(true, localt4.i);
            }
          }
        }
        localy2.f();
      } while (i4 == 0);
      this.t.c(localt1.b(), localt1);
      localy1.f();
      if (i5 != 0) {
        break label55;
      }
      if (i4 == 0) {
        break;
      }
    }
    label372:
    double d5 = 0.0D;
    double d6 = 0.0D;
    double d7 = localt1.a();
    double d8 = this.n.getY();
    localy1 = this.t.a().h();
    a.c.y localy2 = this.s.a().h();
    t localt3;
    a.c.y localy3;
    if (i5 == 0) {
      if (localy1.k() == 0)
      {
        this.r += 1L;
        localt3 = new t(d7, this.n.getY(), this.n.getY() + this.n.getHeight(), (byte)8, this.r);
        this.s.a(this.n.getY(), localt3);
        if (i5 == 0)
        {
          if (this.l)
          {
            localy3 = localz.h();
            do
            {
              if (!localy3.e()) {
                break;
              }
              localt3.a(true, (x)localy3.j());
              localy3.f();
              if ((i5 == 0) && (i4 != 0)) {
                break label570;
              }
            } while (i4 == 0);
          }
          if (i5 != 0) {}
        }
        else
        {
          C();
        }
        label570:
        return;
      }
    }
    if (i5 == 0) {
      if (localy2.k() == 0)
      {
        d2 = 0.0D;
        if (localy1.e()) {}
        label789:
        label791:
        while (i5 != 0)
        {
          localt1 = (t)localy1.j();
          d1 = localt1.b();
          if (i5 != 0) {
            break label841;
          }
          do
          {
            d2 = localt1.c();
            if (i4 != 0) {
              break label809;
            }
            if ((i5 != 0) || (d1 <= d8))
            {
              if (i5 == 0)
              {
                if (d2 <= d8) {
                  break;
                }
                d8 = d2;
                if (i5 != 0) {}
              }
              else
              {
                if (i4 == 0) {
                  break;
                }
              }
            }
            else {
              this.r += 1L;
            }
            localt3 = new t(d7, d8, d1, (byte)8, this.r);
            this.s.a(d8, localt3);
            if (this.l)
            {
              localy3 = localz.h();
              do
              {
                if (!localy3.e()) {
                  break;
                }
                localt3.a(true, (x)localy3.j());
                localy3.f();
                if (i5 != 0) {
                  break label791;
                }
                if (i4 != 0) {
                  break label789;
                }
              } while (i4 == 0);
            }
          } while (i5 != 0);
          d8 = d2;
          localy1.f();
          if (i4 == 0) {
            break;
          }
        }
        this.r += 1L;
        label809:
        label841:
        localt3 = new t(d7, d2, this.n.getY() + this.n.getHeight(), (byte)8, this.r);
        this.s.a(d2, localt3);
        if (i5 == 0)
        {
          if (this.l)
          {
            localy3 = localz.h();
            do
            {
              if (!localy3.e()) {
                break;
              }
              localt3.a(true, (x)localy3.j());
              localy3.f();
              if ((i5 == 0) && (i4 != 0)) {
                break label931;
              }
            } while (i4 == 0);
          }
          if (i5 != 0) {}
        }
        else
        {
          C();
        }
      }
    }
    label931:
    label1070:
    do
    {
      return;
      a.c.y localy4;
      while (!localy4.e())
      {
        do
        {
          do
          {
            int i3;
            do
            {
              if (d8 >= this.n.getY() + this.n.getHeight()) {
                break;
              }
              int i2 = 0;
              do
              {
                if (!localy1.e()) {
                  break;
                }
                if (i4 != 0) {
                  break label1070;
                }
                if (i2 != 0) {
                  break;
                }
                localt1 = (t)localy1.j();
                d1 = localt1.b();
                d2 = localt1.c();
                if (i5 == 0) {
                  if (d1 <= d8)
                  {
                    if (i5 != 0) {
                      continue;
                    }
                    if (d2 <= d8) {
                      break label1052;
                    }
                    d8 = d2;
                    if (i5 != 0) {
                      continue;
                    }
                    if (i4 == 0) {
                      break label1052;
                    }
                  }
                }
                i2 = 1;
                d5 = d8;
                d6 = d1;
                d8 = d2;
                localy1.f();
              } while (i4 == 0);
              if ((i5 == 0) && (i2 == 0))
              {
                d5 = d8;
                d6 = this.n.getY() + this.n.getHeight();
                d8 = d6;
              }
              i3 = 0;
              do
              {
                do
                {
                  if (!localy2.e()) {
                    break label1287;
                  }
                  if (i4 != 0) {
                    break label1294;
                  }
                  if (i3 != 0) {
                    break label1287;
                  }
                  localt2 = (t)localy2.j();
                  d3 = localt2.b();
                  d4 = localt2.c();
                  if (i5 == 0)
                  {
                    if (d3 > d6) {
                      this.r += 1L;
                    }
                  }
                  else
                  {
                    localt3 = new t(d7, d5, d6, (byte)8, this.r);
                    this.s.a(d5, localt3);
                    if (i5 != 0) {
                      break label1280;
                    }
                    if (!this.l) {
                      break;
                    }
                    localy4 = localz.h();
                    do
                    {
                      if (!localy4.e()) {
                        break;
                      }
                      localt3.a(true, (x)localy4.j());
                      localy4.f();
                      if (i5 != 0) {
                        break label1284;
                      }
                      if (i4 != 0) {
                        break label1282;
                      }
                    } while (i4 == 0);
                  }
                } while (i5 != 0);
                localy2.f();
                i3 = 1;
              } while (i4 == 0);
            } while ((i5 != 0) || (i3 != 0));
            this.r += 1L;
            localt3 = new t(d7, d5, d6, (byte)8, this.r);
            if (i5 == 0)
            {
              this.s.a(d5, localt3);
              if ((i5 != 0) || (i4 != 0)) {
                break label1428;
              }
            }
          } while (i5 != 0);
        } while (!this.l);
        localy4 = localz.h();
      }
      localt3.a(true, (x)localy4.j());
      localy4.f();
      if ((i5 == 0) && (i4 != 0)) {
        return;
      }
    } while (i4 == 0);
    label1052:
    if (i5 == 0) {
      C();
    }
    label1280:
    label1282:
    label1284:
    label1287:
    label1294:
    label1428:
    return;
  }
  
  private void B()
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    if (i3 == 0) {
      if (this.u.isEmpty()) {
        return;
      }
    }
    a.c.y localy1 = this.u.h();
    if (localy1.e()) {}
    label659:
    label661:
    label664:
    label683:
    label692:
    while (i3 != 0)
    {
      t localt2 = (t)localy1.j();
      double d3 = localt2.b();
      double d4 = localt2.c();
      do
      {
        a.c.y localy2 = this.s.a().h();
        if ((i3 == 0) && (i2 != 0)) {
          return;
        }
        int i1 = 0;
        do
        {
          do
          {
            if (!localy2.e()) {
              break label664;
            }
            if (i3 != 0) {
              break label692;
            }
            if (i2 != 0) {
              break label683;
            }
            if (i1 != 0) {
              break label664;
            }
            t localt1 = (t)localy2.j();
            double d1 = localt1.b();
            double d2 = localt1.c();
            if ((i3 != 0) || (d2 >= d3))
            {
              if (i3 == 0)
              {
                if (d1 > d4) {
                  i1 = 1;
                }
              }
              else {
                if (i2 == 0) {
                  continue;
                }
              }
              t localt5 = (t)this.s.c(d1, localt1);
              t localt3 = null;
              if (i3 == 0)
              {
                if (d1 < d3) {
                  this.r += 1L;
                }
              }
              else
              {
                localt3 = new t(localt2.a(), d1, d3, (byte)8, this.r);
                this.s.a(d1, localt3);
              }
              t localt4 = null;
              if (i3 == 0)
              {
                if (d2 > d4) {
                  this.r += 1L;
                }
              }
              else
              {
                localt4 = new t(localt2.a(), d4, d2, (byte)8, this.r);
                this.s.a(d4, localt4);
              }
              Object localObject1 = null;
              Object localObject2;
              if (i3 == 0) {
                if (localt2.a() > localt1.a())
                {
                  localObject2 = a(localt1.a(), d1, localt2.a() - localt1.a(), d2 - d1);
                  if (i3 == 0)
                  {
                    if ((localt5.f() instanceof d)) {
                      ((x)localObject2).a();
                    }
                    localt5.a(localObject2);
                    if (i3 == 0)
                    {
                      localt1.a(localObject2);
                      ((x)localObject2).a(localt5, localt1);
                    }
                  }
                  else
                  {
                    if (!this.l) {
                      continue;
                    }
                  }
                  if (i3 == 0) {
                    if (localt3 != null) {
                      localt3.a(true, (x)localObject2);
                    }
                  }
                  if ((i3 != 0) || (localt4 != null)) {
                    localt4.a(true, (x)localObject2);
                  }
                  if ((i3 != 0) || (localObject1 != null)) {
                    localObject1.a(true, (x)localObject2);
                  }
                  ((y)localObject2).a(true, localt5.i);
                }
              }
              if ((i3 != 0) || ((i2 != 0) && (this.l)))
              {
                if (i3 == 0)
                {
                  if (localt3 != null)
                  {
                    localObject2 = localt1.i.h();
                    do
                    {
                      if (!((a.c.y)localObject2).e()) {
                        break;
                      }
                      localt3.a(true, (x)((a.c.y)localObject2).j());
                      ((a.c.y)localObject2).f();
                      if (i3 != 0) {
                        break label661;
                      }
                      if (i2 != 0) {
                        break label659;
                      }
                    } while (i2 == 0);
                  }
                  if (i3 != 0) {
                    break;
                  }
                }
                if ((i3 != 0) || (localt4 != null))
                {
                  localObject2 = localt1.i.h();
                  do
                  {
                    if (!((a.c.y)localObject2).e()) {
                      break;
                    }
                    localt4.a(true, (x)((a.c.y)localObject2).j());
                    ((a.c.y)localObject2).f();
                    if (i3 != 0) {
                      break label661;
                    }
                    if (i2 != 0) {
                      break label659;
                    }
                  } while (i2 == 0);
                }
              }
            }
          } while (i3 != 0);
          localy2.f();
        } while (i2 == 0);
      } while (i3 != 0);
      this.t.a(localt2.b(), localt2);
      localy1.f();
      if (i2 == 0) {
        break;
      }
    }
    C();
  }
  
  private void C()
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    a.c.y localy1 = this.t.a().h();
    a.c.y localy2 = this.s.a().h();
    if (i3 == 0) {
      if (localy1.k() == 0) {
        return;
      }
    }
    if (localy2.k() == 0) {
      return;
    }
    a.c.z localz = new a.c.z();
    localy1.h();
    do
    {
      do
      {
        if (!localy1.e()) {
          break;
        }
        t localt3 = (t)localy1.j();
        if (i3 != 0) {
          break label157;
        }
        if (i2 != 0) {
          break label154;
        }
        if (i3 == 0)
        {
          if ((localt3.f() instanceof d)) {
            localz.add(localt3);
          }
          localy1.f();
        }
      } while (i2 == 0);
      localy1.h();
    } while (i3 != 0);
    label154:
    label157:
    Object localObject = (t)localy2.j();
    double d5 = ((t)localObject).b();
    double d6 = ((t)localObject).c();
    if ((i3 != 0) || (this.I.get(localObject) == null)) {
      this.I.a((t)localObject, new nb());
    }
    localy2.f();
    label217:
    if (localy2.e()) {
      break label288;
    }
    label288:
    label358:
    label363:
    label620:
    label767:
    do
    {
      while (i3 != 0)
      {
        t localt1 = (t)localy2.j();
        double d1 = localt1.b();
        if (i3 != 0) {
          break label620;
        }
        double d2 = localt1.c();
        if (i2 != 0) {
          break label617;
        }
        if (this.I.get(localt1) == null) {
          this.I.a(localt1, new nb());
        }
        int i1 = 0;
        do
        {
          do
          {
            do
            {
              do
              {
                if (!localy1.e()) {
                  break label570;
                }
                if (i2 != 0) {
                  break;
                }
                if (i1 != 0) {
                  break label570;
                }
                localt2 = (t)localy1.j();
                d3 = localt2.b();
                d4 = localt2.c();
                if (i3 != 0) {
                  break label363;
                }
                if (!(localt2.f() instanceof d)) {
                  break label358;
                }
                localy1.f();
              } while ((i3 == 0) && (i2 == 0));
              if (i3 != 0) {
                break label435;
              }
              if (d4 > d5) {
                break label430;
              }
              if (i3 == 0)
              {
                if (d4 == d5) {
                  b(localt2, (t)localObject, (byte)2);
                }
              }
              else
              {
                if (i3 != 0) {
                  continue;
                }
                if (i2 == 0) {
                  break label414;
                }
              }
              a(localz, localt2, (t)localObject, (byte)2);
              localy1.f();
            } while ((i3 == 0) && (i2 == 0));
            if (i3 != 0) {
              break label567;
            }
            if (d3 < d6) {
              break label562;
            }
            if (i3 != 0) {
              break label567;
            }
            if (d4 > d1) {
              break label562;
            }
            if (i3 == 0) {
              if (d3 == d6) {
                b(localt2, (t)localObject, (byte)1);
              }
            }
            if (i3 == 0) {
              if (d3 > d6) {
                a(localz, localt2, (t)localObject, (byte)1);
              }
            }
            if (i3 == 0) {
              if (d4 == d1) {
                b(localt2, localt1, (byte)2);
              }
            }
            if (i3 == 0)
            {
              if (d4 < d1) {
                a(localz, localt2, localt1, (byte)2);
              }
              localy1.f();
            }
            if (i3 != 0) {
              break label567;
            }
          } while (i2 == 0);
          i1 = 1;
        } while (i2 == 0);
        localObject = localt1;
        d5 = d1;
        d6 = d2;
        localy2.f();
        if (i3 != 0) {
          break label217;
        }
        if (i2 == 0) {
          break;
        }
      }
      if (!localy1.e()) {
        return;
      }
      t localt2 = (t)localy1.j();
      double d3 = localt2.b();
      double d4 = localt2.c();
      if ((i3 != 0) || (!(localt2.f() instanceof d)))
      {
        if (i3 == 0) {
          if (d3 >= d6)
          {
            if (i3 == 0)
            {
              if (d3 == d6) {
                b(localt2, (t)localObject, (byte)1);
              }
            }
            else
            {
              if (i3 != 0) {
                break label716;
              }
              if (i2 == 0) {
                break label711;
              }
            }
            a(localz, localt2, (t)localObject, (byte)1);
          }
        }
        if (i3 != 0) {
          continue;
        }
        if (d4 <= d5)
        {
          if (i3 == 0)
          {
            if (d4 == d5) {
              b(localt2, (t)localObject, (byte)2);
            }
          }
          else
          {
            if (i3 != 0) {
              continue;
            }
            if (i2 == 0) {
              break label767;
            }
          }
          a(localz, localt2, (t)localObject, (byte)2);
        }
      }
      localy1.f();
    } while (i2 == 0);
    label414:
    label430:
    label435:
    label567:
    label570:
    label617:
    return;
  }
  
  private void a(a.c.z paramz, t paramt1, t paramt2, byte paramByte)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    int i1 = 0;
    double d1 = paramt1.b();
    double d2 = paramt1.c();
    double d3 = paramt2.b();
    double d4 = paramt2.c();
    t localt;
    double d5;
    double d6;
    if (paramByte == 2)
    {
      localy = paramz.h();
      do
      {
        if (!localy.e()) {
          break;
        }
        if (i2 != 0) {
          break label236;
        }
        if (i1 != 0) {
          break;
        }
        localt = (t)localy.j();
        d5 = localt.b();
        d6 = localt.c();
        if (i3 == 0)
        {
          if (d6 >= d2)
          {
            if (i3 != 0) {
              continue;
            }
            if (d6 <= d3) {
              i1 = 1;
            }
          }
          localy.f();
        }
      } while (i2 == 0);
    }
    a.c.y localy = paramz.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      if (i2 != 0) {
        break label236;
      }
      if (i1 != 0) {
        break;
      }
      localt = (t)localy.j();
      d5 = localt.b();
      d6 = localt.c();
      if (i3 == 0)
      {
        if (d5 <= d1)
        {
          if (i3 != 0) {
            continue;
          }
          if (d5 >= d4) {
            i1 = 1;
          }
        }
        localy.f();
      }
    } while (i2 == 0);
    if ((i3 == 0) && (i1 == 0)) {
      label236:
      a(paramt1, paramt2, paramByte);
    }
  }
  
  private void D()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    k localk = this.i.c(f.h);
    a.c.w localw = this.B.l();
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale = localw.d();
      a.d.t localt = this.i.v(locale);
      if (((i2 != 0) || (localk != null)) && (localk.getBool(locale))) {
        localt = new a.d.t(this.i.m(locale) - 0.5D, this.i.n(locale) - 0.5D, 1.0D, 1.0D);
      }
      double d1 = localt.d();
      double d2 = d1 + localt.b();
      double d3 = localt.e();
      double d4 = d3 + localt.c();
      this.r += 1L;
      t localt1 = a(this.z, d1, d3, d4, this.r, locale);
      this.I.a(localt1, new nb());
      b(this.z, d2, d3, d4, this.r, locale);
      localw.f();
    } while (i1 == 0);
  }
  
  boolean a(e parame, a.d.w paramw1, a.d.w paramw2, k paramk)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    byte b1 = 0;
    if (i3 == 0) {
      if (this.M)
      {
        if (i3 == 0) {
          if (paramw1.a == paramw2.a)
          {
            if (i3 != 0) {
              break label81;
            }
            if (paramw1.b < paramw2.b)
            {
              b1 = 2;
              if (i3 != 0) {
                break label404;
              }
              if (i2 == 0) {
                break label393;
              }
            }
          }
        }
        label81:
        if (i3 == 0) {
          if (paramw1.a == paramw2.a)
          {
            if (i3 != 0) {
              break label128;
            }
            if (paramw1.b > paramw2.b)
            {
              b1 = 1;
              if (i3 != 0) {
                break label404;
              }
              if (i2 == 0) {
                break label393;
              }
            }
          }
        }
        label128:
        if (i3 == 0) {
          if (paramw1.b == paramw2.b)
          {
            if (i3 != 0) {
              break label175;
            }
            if (paramw1.a < paramw2.a)
            {
              b1 = 4;
              if (i3 != 0) {
                break label404;
              }
              if (i2 == 0) {
                break label393;
              }
            }
          }
        }
        label175:
        if (i3 != 0) {
          break label404;
        }
        if (paramw1.b != paramw2.b) {
          break label393;
        }
        if (i3 != 0) {
          break label404;
        }
        if (paramw1.a <= paramw2.a) {
          break label393;
        }
        b1 = 8;
        if (i3 != 0) {
          break label404;
        }
        if (i2 == 0) {
          break label393;
        }
      }
    }
    if (i3 == 0) {
      if (paramw1.a == paramw2.a)
      {
        if (i3 != 0) {
          break label270;
        }
        if (paramw1.b < paramw2.b)
        {
          b1 = 4;
          if (i3 != 0) {
            break label404;
          }
          if (i2 == 0) {
            break label393;
          }
        }
      }
    }
    label270:
    if (i3 == 0) {
      if (paramw1.a == paramw2.a)
      {
        if (i3 != 0) {
          break label318;
        }
        if (paramw1.b > paramw2.b)
        {
          b1 = 8;
          if (i3 != 0) {
            break label404;
          }
          if (i2 == 0) {
            break label393;
          }
        }
      }
    }
    label318:
    if (i3 == 0) {
      if (paramw1.b == paramw2.b)
      {
        if (i3 != 0) {
          break label365;
        }
        if (paramw1.a < paramw2.a)
        {
          b1 = 2;
          if (i3 != 0) {
            break label404;
          }
          if (i2 == 0) {
            break label393;
          }
        }
      }
    }
    label365:
    if (i3 == 0) {
      if (paramw1.b == paramw2.b)
      {
        if (i3 != 0) {
          break label404;
        }
        if (paramw1.a > paramw2.a) {
          b1 = 1;
        }
      }
    }
    label393:
    label404:
    int i1 = ad.a(cd.a(b1)).a();
    k localk1 = this.i.c(ed.a);
    k localk2 = this.i.c(ed.b);
    a.c.m localm = parame.l();
    label608:
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      if (i2 != 0) {
        break label864;
      }
      if (!paramk.getBool(locald))
      {
        cd localcd;
        a.d.w localw;
        if (i3 == 0) {
          if (locald.e() == parame)
          {
            localcd = cd.d(this.i, locald);
            if (((i3 != 0) || (localcd != null)) && ((i3 != 0) || (localcd.a())) && (((i3 == 0) && (localcd.g())) || (localcd.b() == b1)))
            {
              localw = this.i.r(locald);
              if (i3 == 0) {
                if (paramw1.a == paramw2.a)
                {
                  if (i3 != 0) {
                    break label608;
                  }
                  if (Math.abs(paramw1.a - localw.a) < 1.0D) {
                    return true;
                  }
                }
              }
              if (((i3 != 0) || (paramw1.b == paramw2.b)) && ((i3 != 0) || (Math.abs(paramw1.b - localw.b) < 1.0D))) {
                return true;
              }
            }
          }
        }
        if (locald.f() == parame)
        {
          if (i3 != 0) {
            break label808;
          }
          localcd = cd.e(this.i, locald);
          if (localcd != null)
          {
            if (i3 != 0) {
              break label819;
            }
            if (localcd.a()) {
              if ((i3 != 0) || (!localcd.g()))
              {
                if (i3 != 0) {
                  break label819;
                }
                if (localcd.b() != b1) {}
              }
              else
              {
                localw = this.i.s(locald);
                if (i3 == 0) {
                  if (paramw1.a == paramw2.a)
                  {
                    if (i3 != 0) {
                      break label774;
                    }
                    if (Math.abs(paramw1.a - localw.a) < 1.0D) {
                      return true;
                    }
                  }
                }
                if (i3 != 0) {
                  break label819;
                }
                if (paramw1.b == paramw2.b)
                {
                  if (i3 != 0) {
                    break label819;
                  }
                  if (Math.abs(paramw1.b - localw.b) < 1.0D) {
                    return true;
                  }
                }
              }
            }
          }
        }
        if (i3 == 0) {
          if (a(locald, true, i1, parame, paramw1, paramw2)) {
            return true;
          }
        }
        if (i3 != 0) {
          continue;
        }
        if (a(locald, false, i1, parame, paramw1, paramw2)) {
          return true;
        }
      }
      localm.f();
    } while (i2 == 0);
    label774:
    label808:
    label819:
    label864:
    return false;
  }
  
  private boolean a(d paramd, boolean paramBoolean, int paramInt, e parame, a.d.w paramw1, a.d.w paramw2)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    Collection localCollection = o.a(this.i, paramd, paramBoolean);
    if (((i2 != 0) || (localCollection != null)) && ((i2 != 0) || (!localCollection.isEmpty())))
    {
      Iterator localIterator = localCollection.iterator();
      while (localIterator.hasNext())
      {
        ad localad = (ad)localIterator.next();
        if (localad.b())
        {
          if ((i2 != 0) || (i1 != 0)) {
            break label226;
          }
          if (localad.a(paramInt))
          {
            a.d.w localw = a.d.w.b(this.i.o(parame), new a.d.w(localad.c(), localad.d()));
            if (i2 == 0) {
              if (paramw1.a == paramw2.a)
              {
                if (i2 != 0) {
                  break label191;
                }
                if (Math.abs(paramw1.a - localw.a) < 1.0D) {
                  return true;
                }
              }
            }
            label191:
            if (((i2 != 0) || (paramw1.b == paramw2.b)) && ((i2 != 0) || (Math.abs(paramw1.b - localw.b) < 1.0D))) {
              return true;
            }
          }
        }
      }
    }
    label226:
    return false;
  }
  
  private void F()
  {
    int i5 = g.Cc;
    int i4 = g.Bc;
    n localn = db.b(new boolean[this.i.l()]);
    do
    {
      localObject1 = this.C.l();
      while (i4 == 0)
      {
        if (!((a.c.m)localObject1).e()) {
          break;
        }
        if (i4 != 0) {
          break label84;
        }
        localn.a(((a.c.m)localObject1).a(), true);
        ((a.c.m)localObject1).f();
      }
    } while (i5 != 0);
    label84:
    Object localObject1 = this.i.c(f.h);
    a.c.m localm = this.C.l();
    label157:
    label305:
    label470:
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        double d1 = this.k;
        double d2 = this.k;
        if ((i5 != 0) || (localObject1 != null))
        {
          if (i5 != 0) {
            break label157;
          }
          if (((k)localObject1).getBool(locald.e())) {
            d1 = d2 = 1.0D;
          }
        }
        int i1 = 1;
        int i2 = 0;
        a.c.z localz = this.i.o(locald);
        if ((i5 != 0) || (!localz.isEmpty()))
        {
          v localv = localz.f();
          Object localObject2 = (a.d.w)localv.c();
          int i3 = 0;
          localv = localv.a();
          do
          {
            if (localv == null) {
              break label572;
            }
            a.d.w localw = (a.d.w)localv.c();
            if (i4 != 0) {
              break;
            }
            if (Math.abs(((a.d.w)localObject2).a - localw.a) < 0.01D)
            {
              if (i5 == 0) {
                if (i3 == 0)
                {
                  if (i5 != 0) {
                    break label305;
                  }
                  if (a(locald.e(), (a.d.w)localObject2, localw, localn))
                  {
                    localObject2 = localw;
                    if (i5 != 0) {
                      continue;
                    }
                    if (i4 == 0) {
                      break label557;
                    }
                  }
                }
              }
              if ((i5 != 0) || (i3 == localz.size() - 2)) {
                if (i5 == 0)
                {
                  if (a(locald.f(), localw, (a.d.w)localObject2, localn)) {
                    localObject2 = localw;
                  }
                }
                else
                {
                  if (i5 != 0) {
                    continue;
                  }
                  if (i4 == 0) {
                    break label557;
                  }
                }
              }
              double d3 = Math.min(((a.d.w)localObject2).b, localw.b);
              double d4 = Math.max(((a.d.w)localObject2).b, localw.b);
              if (i5 == 0)
              {
                if (i3 == localz.size() - 3)
                {
                  localObject3 = (a.d.w)localv.a().c();
                  if (i5 != 0) {
                    break label470;
                  }
                  if (a(locald.f(), (a.d.w)localObject3, localw, localn))
                  {
                    d1 = -d1;
                    d1 = Math.max(d1, 0.5D * (d3 - d4));
                  }
                }
                this.r += 1L;
              }
              Object localObject3 = a(this.z, ((a.d.w)localObject2).a - d2, d3 - d1, d4 + d1, this.r, locald);
              t localt = b(this.z, ((a.d.w)localObject2).a + d2, d3 - d1, d4 + d1, this.r, locald);
              i2 = 1;
              this.J += 1;
            }
            else
            {
              i1 = 0;
              localObject2 = localw;
            }
            localv = localv.a();
            i3++;
          } while (i4 == 0);
        }
        localm.f();
      } while (i5 != 0);
    } while (i4 == 0);
    label557:
    label572:
    return;
  }
  
  private void G()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    a.c.y localy = this.E.h();
    if (localy.e()) {}
    while (i2 != 0)
    {
      x localx = (x)localy.j();
      this.r += 1L;
      a(this.x, localx.a.a, localx.a.b, localx.b.b, this.r, localx);
      b(this.x, localx.b.a, localx.a.b, localx.b.b, this.r, localx);
      localy.f();
      if ((i2 == 0) && (i1 != 0)) {
        return;
      }
      if (i1 == 0) {
        break;
      }
    }
    this.x.a(new f_());
  }
  
  private void H()
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    a.c.y localy = this.D.h();
    if (localy.e()) {}
    while (i2 != 0)
    {
      x localx = (x)localy.j();
      this.r += 1L;
      a(this.y, localx.a.a, localx.a.b, localx.b.b, this.r, localx);
      b(this.y, localx.b.a, localx.a.b, localx.b.b, this.r, localx);
      localy.f();
      if ((i2 == 0) && (i1 != 0)) {
        return;
      }
      if (i1 == 0) {
        break;
      }
    }
    this.y.a(new f_());
  }
  
  private t a(a.c.z paramz, double paramDouble1, double paramDouble2, double paramDouble3, long paramLong, Object paramObject)
  {
    t localt = new t(paramDouble1, paramDouble2, paramDouble3, (byte)8, paramLong);
    localt.a(paramObject);
    paramz.add(localt);
    return localt;
  }
  
  private t b(a.c.z paramz, double paramDouble1, double paramDouble2, double paramDouble3, long paramLong, Object paramObject)
  {
    t localt = new t(paramDouble1, paramDouble2, paramDouble3, (byte)-8, paramLong);
    localt.a(paramObject);
    paramz.add(localt);
    return localt;
  }
  
  static class f_
    implements Comparator
  {
    public int compare(Object paramObject1, Object paramObject2)
    {
      int j = g.Cc;
      int i = l.a(((t)paramObject1).a(), ((t)paramObject2).a());
      if (j == 0)
      {
        if (i != 0) {
          return i;
        }
        i = l.a(((t)paramObject1).b(), ((t)paramObject2).b());
      }
      if (j == 0)
      {
        if (i != 0) {
          return i;
        }
        i = l.a(((t)paramObject1).c(), ((t)paramObject2).c());
      }
      return i;
    }
  }
  
  static class d_
    extends eb.c_
  {
    public boolean a(Object paramObject1, Object paramObject2)
    {
      if (g.Cc == 0) {}
      boolean bool = ((t)paramObject1).e() == ((t)paramObject2).e();
      return bool;
    }
  }
  
  static abstract class c_
  {
    public abstract boolean a(Object paramObject1, Object paramObject2);
  }
  
  class e_
  {
    private e_ a = null;
    private e_ b = null;
    private double c;
    private Object e;
    
    public e_(double paramDouble, Object paramObject)
    {
      this.c = paramDouble;
      this.e = paramObject;
    }
  }
  
  class b_
  {
    private eb.e_ a;
    private int b;
    private eb.c_ d;
    
    public b_(eb.c_ paramc_)
    {
      this.d = paramc_;
      this.a = null;
      this.b = 0;
    }
    
    public boolean a(double paramDouble, Object paramObject)
    {
      int j = g.Cc;
      int i = g.Bc;
      boolean bool = false;
      if (j == 0) {
        if (this.b == 0)
        {
          this.a = new eb.e_(eb.this, paramDouble, paramObject);
          if (j == 0)
          {
            if (this.a != null) {
              bool = true;
            }
          }
          else {
            this.b += 1;
          }
          return bool;
        }
      }
      Object localObject = this.a;
      eb.e_ locale_1 = this.a;
      if (locale_1 != null)
      {
        if (i == 0) {
          localObject = locale_1;
        }
      }
      else {
        label137:
        while (j != 0)
        {
          if (j == 0)
          {
            if (paramDouble < locale_1.c)
            {
              locale_1 = locale_1.a;
              if (j != 0) {
                break label137;
              }
              if (i == 0) {
                break;
              }
            }
            locale_1 = locale_1.b;
          }
          if (i == 0) {
            break;
          }
        }
      }
      eb.e_ locale_2 = new eb.e_(eb.this, paramDouble, paramObject);
      if (j == 0)
      {
        if (locale_2 != null)
        {
          bool = true;
          if (j == 0)
          {
            if (paramDouble < ((eb.e_)localObject).c) {
              ((eb.e_)localObject).a = locale_2;
            }
          }
          else
          {
            if (j != 0) {
              break label226;
            }
            if (i == 0) {
              break label214;
            }
          }
          ((eb.e_)localObject).b = locale_2;
        }
        label214:
        this.b += 1;
      }
      label226:
      return bool;
    }
    
    private eb.e_[] a(eb.e_ parame_, double paramDouble)
    {
      int k = g.Cc;
      int j = g.Bc;
      eb.e_[] arrayOfe_ = new eb.e_[2];
      Object localObject = parame_;
      eb.e_ locale_ = parame_;
      int i = 0;
      label79:
      label113:
      do
      {
        do
        {
          do
          {
            if (locale_ == null) {
              break label116;
            }
            if (j != 0) {
              break label123;
            }
            if (i != 0) {
              break label116;
            }
            if (k != 0) {
              break label79;
            }
            if (paramDouble != locale_.c) {
              break;
            }
            i = 1;
            if (k != 0) {
              break label79;
            }
          } while (j == 0);
          localObject = locale_;
          if (k != 0) {
            break label113;
          }
          if (paramDouble >= locale_.c) {
            break;
          }
          locale_ = locale_.a;
          if (k != 0) {
            break label113;
          }
        } while (j == 0);
        locale_ = locale_.b;
      } while (j == 0);
      label116:
      if (k == 0)
      {
        if (i == 0)
        {
          label123:
          arrayOfe_[0] = null;
          if (k != 0) {
            break label160;
          }
          arrayOfe_[1] = null;
          if (j == 0) {}
        }
        else
        {
          arrayOfe_[0] = localObject;
        }
      }
      else {
        arrayOfe_[1] = locale_;
      }
      label160:
      return arrayOfe_;
    }
    
    public Object c(double paramDouble, Object paramObject)
    {
      int k = g.Cc;
      int j = g.Bc;
      if (k == 0) {
        if (this.b == 0) {
          return null;
        }
      }
      int i = 0;
      Object localObject = this.a;
      eb.e_ locale_1 = this.a;
      label165:
      do
      {
        do
        {
          if (locale_1 == null) {
            break label168;
          }
          if (j != 0) {
            break label175;
          }
          if (i != 0) {
            break label168;
          }
          eb.e_[] arrayOfe_ = a(locale_1, paramDouble);
          if ((k == 0) && ((arrayOfe_[0] == null) && ((k == 0) && (arrayOfe_[1] == null)))) {
            break label168;
          }
          if (k == 0) {
            if (arrayOfe_[0] != arrayOfe_[1]) {
              localObject = arrayOfe_[0];
            }
          }
          locale_1 = arrayOfe_[1];
          if (k != 0) {
            break label165;
          }
          if (!this.d.a(paramObject, locale_1.e)) {
            break;
          }
          i = 1;
          if (k != 0) {
            break label165;
          }
        } while (j == 0);
        localObject = locale_1;
        locale_1 = locale_1.b;
      } while (j == 0);
      label168:
      if ((k == 0) && (i != 0))
      {
        label175:
        eb.e_ locale_3 = locale_1;
        if (k == 0) {
          if (locale_3.b == null)
          {
            if (k != 0) {
              break label343;
            }
            locale_1 = locale_1.a;
            if (j == 0) {
              break label341;
            }
          }
        }
        if (k == 0) {
          if (eb.e_.access$400(locale_3).a == null)
          {
            locale_1 = locale_1.b;
            if (k != 0) {
              break label343;
            }
            locale_1.a = locale_3.a;
            if (j == 0) {
              break label341;
            }
          }
        }
        eb.e_ locale_2 = locale_1.b;
        do
        {
          do
          {
            if (eb.e_.access$300(locale_2).a == null) {
              break;
            }
            if (k != 0) {
              break label340;
            }
            locale_2 = locale_2.a;
            if (j != 0) {
              break label330;
            }
          } while (j == 0);
          locale_1 = locale_2.a;
          locale_2.a = locale_1.b;
        } while (k != 0);
        locale_1.a = locale_3.a;
        label330:
        label340:
        locale_1.b = locale_3.b;
        label341:
        label343:
        if (k == 0) {
          if (localObject == locale_3)
          {
            this.a = locale_1;
            if (k != 0) {
              break label424;
            }
            if (j == 0) {
              break label414;
            }
          }
        }
        if (k == 0) {
          if (locale_3.c < ((eb.e_)localObject).c)
          {
            ((eb.e_)localObject).a = locale_1;
            if (k != 0) {
              break label424;
            }
            if (j == 0) {
              break label414;
            }
          }
        }
        ((eb.e_)localObject).b = locale_1;
        this.b -= 1;
        return locale_3.e;
      }
      label414:
      label424:
      return null;
    }
    
    public a.c.z a()
    {
      int j = g.Cc;
      int i = g.Bc;
      a.c.z localz = new a.c.z();
      i locali = new i(this.b);
      eb.e_ locale_ = this.a;
      do
      {
        if (locale_ == null) {
          break;
        }
        locali.a(locale_);
        locale_ = locale_.a;
        if (j != 0) {
          break label108;
        }
        if (i != 0) {
          break label106;
        }
      } while ((j == 0) && (i == 0));
      if (j == 0)
      {
        if (locali.f()) {
          break label111;
        }
        locale_ = (eb.e_)locali.b();
      }
      label106:
      label108:
      label111:
      while (j != 0)
      {
        localz.add(locale_.e);
        locale_ = locale_.b;
        if (i == 0) {
          break;
        }
      }
      return localz;
    }
    
    private a.c.z a(eb.e_ parame_, a.c.z paramz)
    {
      if (parame_ != null)
      {
        a(parame_.a, paramz);
        paramz.add(parame_.e);
        a(parame_.b, paramz);
      }
      return paramz;
    }
  }
  
  static class g_
    extends a.d.t
  {
    x h;
    
    g_(x paramx)
    {
      super(paramx.a.b, paramx.b.a - paramx.a.a, paramx.b.b - paramx.a.b);
      this.h = paramx;
    }
    
    public a.d.t a()
    {
      return this;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.eb

 * JD-Core Version:    0.7.0.1

 */